AddHiliteSample
The AddHiliteSample function provides dynamic highlighting of text.
pascal ComponentResult AddHiliteSample (MediaHandler mh,
short hiliteStart,
short hiliteEnd,
RGBColor *rgbHiliteColor,
TimeValue duration,
TimeValue *sampleTime)
mh
- Specifies the media handler for the text media obtained by the
GetMediaHandler function.
hiliteStart
-
Indicates the beginnning of the text to be highlighted.
hiliteEnd
- Indicates the ending of the text to be highlighted. If the value of the
hiliteStart parameter equals that of the hiliteEnd parameter, then no text is highlighted (that is, highlighting is turned off for the duration of the specified sample).
rgbHiliteColor
- Contains a pointer to the RGB color for highlighting. If this parameter is not
nil, then the specified color is used when highlighting the text indicated by the hiliteStart and hiliteEnd parameters. Otherwise, the default system highlight color is used.
duration
- Specifies how long the text sample should last. This duration is expressed in the media's time base.
sampleTime
-
Contains a pointer to a TimeValue structure. The actual media time at which the sample was added is returned here.
DESCRIPTION
The AddHiliteSample function essentially extends the duration of the text that has just been added, using the highlighting indicated by the hiliteStart and hiliteEnd parameters. You must call the AddHiliteSample function after calling AddTextSample or AddTESample. Since AddHiliteSample uses the concept of difference frames, the highlighted samples must immediately follow their associated text samples.
ERROR CODES
| invalidMedia | -2008 | This media is corrupted or invalid |
File Manager errors
Memory Manager errors